﻿using System;
using System.Collections.Generic;
using System.Text;
using XhPaper.基本图形;

namespace XhPaper
{
    public class MyTableJkbMini : MyTableBase
    {
        MyDuanZi[] m_dz=new MyDuanZi[3];
        public MyDuanZi[] Dz
        {
            get { return m_dz; }
            //set { m_dz = value; }
        }
        public MyTableJkbMini()
        {

        }
        public MyTableJkbMini(double left, double top, MyAutoCadObjectBase container)
            :base(left + container.Left, container.Top+top, container)
        {
            ITable = new XmlTableJkbMini();
            m_HangLines = ITable.GetHangLines(this);
            m_LieLines = ITable.GetLieLines(this);
            ITable.GetNameTextDic(this, out m_TableNameDic, out m_TableTextDic);
            MyPoint p1 = m_HangLines[0].P1.inflate(4, 4);
            MyPoint p2 = m_HangLines[0].P1.inflate(4, 14);
            MyPoint p3 = m_HangLines[0].P1.inflate(4, 24);
            MyText text = new MyText(p1, "-12V", this);
            Dz[2] = new MyDuanZi(p1, text, this);
            text = new MyText(p1, "GND", this);
            Dz[1] = new MyDuanZi(p2, text, this);
            text = new MyText(p3, "+12V", this);
            Dz[0] = new MyDuanZi(p3, text, this);
        }
        public override void MyDraw(MyCadDll.MyCad mycad)
        {
            base.MyDraw(mycad);
            foreach (MyDuanZi d in Dz)
            {
                d.MyDraw(mycad);
            }
        }
    }
}
